package cn.itsource.user.controller;

import cn.itsource.user.service.IWxUserService;
import cn.itsource.util.AjaxResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("/wxUser")
public class WxUserController {

    @Autowired
    private IWxUserService wxUserService;
    @PostMapping("/wxUserLogin")
    public AjaxResult wxUserLogin(@RequestBody Map<String, String> map){
        return  wxUserService.wxLogin(map);
    }
    /*
    * {phone:15008495702,code:9527}
    *
    * */
    @PostMapping("/bind")
    public AjaxResult bind(@RequestBody Map<String, String> map){
        return  wxUserService.bind(map);
    }
}
